﻿/*************************************************************************
* 计算机名：AA-FA-05
* CLR 版本：4.0.30319.42000
* 命名空间: CustomControls.Controls
* 类    名：FixedContentTabControl
* 当 前 域：HYRC
* 创 建 人：dailuyu
* 创建时间：2021/6/18 14:47:26
* 描    述：
*  V0.01 2021 初版
*
*  Copyright (c) 2021 aatsr Corporation. All rights reserved.
*  ┌──────────────────────────────────┐
*  │　此技术信息为本公司机密信息，未经本公司书面同意禁止向第三方披露．　│
*  └──────────────────────────────────┘
***************************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;

namespace CustomControls.Controls
{
    public class FixedContentTabControl : TabControl
    {
        #region 依赖属性

        #region FixedContent

        /// <summary>
        /// 获取或设置固定的内容
        /// </summary>
        public object FixedContent
        {
            get { return (object)GetValue(FixedContentProperty); }
            set { SetValue(FixedContentProperty, value); }
        }

        public static readonly DependencyProperty FixedContentProperty =
            DependencyProperty.Register("FixedContent", typeof(object), typeof(FixedContentTabControl), new PropertyMetadata(null));

        #endregion

        #region HeaderHeight

        /// <summary>
        /// 获取或设置标签头高度
        /// </summary>
        public double HeaderHeight
        {
            get { return (double)GetValue(HeaderHeightProperty); }
            set { SetValue(HeaderHeightProperty, value); }
        }

        public static readonly DependencyProperty HeaderHeightProperty =
            DependencyProperty.Register("HeaderHeight", typeof(double), typeof(FixedContentTabControl), new PropertyMetadata(35d));

        #endregion

        #region ToolbarContent

        /// <summary>
        /// 获取或设置工具栏内容
        /// </summary>
        public object ToolbarContent
        {
            get { return (object)GetValue(ToolbarContentProperty); }
            set { SetValue(ToolbarContentProperty, value); }
        }

        public static readonly DependencyProperty ToolbarContentProperty =
            DependencyProperty.Register("ToolbarContent", typeof(object), typeof(FixedContentTabControl), new PropertyMetadata(null));

        #endregion

        #endregion

        #region 构造函数
        static FixedContentTabControl()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(FixedContentTabControl), new FrameworkPropertyMetadata(typeof(FixedContentTabControl)));
        }
        #endregion
    }
}
